import jieba

sentence = "Gitee是中国推出的基于Git的代码托管服务"
# cut返回一个generator
s1 = jieba.cut(sentence)
print(s1)
# 转换之后查看结果
print('/'.join(s1))
li1 = [word for word in jieba.cut(sentence)]
print(li1)
# lcut返回列表
list1 = jieba.lcut(sentence)
print(list1)
# 分词模式默认是精准模式，False可以省略
print(jieba.lcut(sentence, False))
# True表示全模式分词
print(jieba.lcut(sentence, True))
